package com.example.leetdemo.process;

import java.util.Arrays;

public class Solution215 {

    public int findKthLargest(int[] nums, int k) {
        Arrays.sort(nums);
        return nums[nums.length - k];
    }


    // 排序
    // 快排
    private int[] quickSort(int[] nums, int i, int j, int k) {

        while (i < j) {

            if (nums[i] <= k) {
                i++;
            }
            if (nums[i] >= k) {
                j--;
            }
        }
        return nums;
    }

}
